<template>
  <div class="containner">
    <div class="left">
      <div class="image"></div>
    </div>
    <div class="right">
      <div class="idName">{{ contentInfo.idName }}</div>
      <div class="text">{{ contentInfo.text }}</div>
      <div class="content">
        <div class="c-left">
          <img :src="'http://localhost:3000/src/assets/act-img.png'" alt="aa" />
        </div>
        <div class="c-right">{{ contentInfo.content }}</div>
      </div>
      <div class="footer">
        <div class="left">
          <div class="timestamp">{{ `昨天 ${contentInfo.timestamp}` }}</div>
          <i class="del-icon" />
        </div>
        <div class="btn">··</div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, reactive, computed } from 'vue'
const contentInfo = reactive({
  idName: '南岸',
  text: '求点赞',
  content: '招聘 | 广东生农村信用社联合社2024届秋季校园招聘',
  imagSrc: 'act-img.png',
  timestamp: '15:30',
})
const imgSrc = computed(
  () => new URL(`../assets/${contentInfo.imagSrc})`, import.meta.url).href
)
</script>
<style lang="scss" scoped>
.containner {
  width: 100%;
  height: 100%;
  padding: 3px;
  display: flex;
  align-items: start;
  .left {
    margin-right: 0.5em;
    .image {
      width: 3em;
      height: 3em;
      border-radius: 5px;
      background: url('../assets/profile-photo.jpg') no-repeat;
      background-size: contain;
    }
  }
  .right {
    display: flex;
    flex-direction: column;
    align-items: start;
    row-gap: 0.3em;

    .idName {
      font-size: 20px;
      color: #58659c;
    }
    .text {
      font-size: 18px;
    }
    .content {
      display: flex;
      font-size: 14px;
      background-color: #f7f7f7;
      align-items: center;
      padding: 0.2em;
      margin-right: 1em;
      .c-left {
        margin-right: 0.2em;
        img {
          vertical-align: middle;
          width: 3em;
          height: 3em;
        }
      }
      .c-right {
        flex: 1;
        text-align: left;
      }
    }
    .footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      .left {
        display: flex;
        .timestamp {
          color: #b1b1b1;
          font-size: 14px;
          margin-right: 0.6em;
        }
        .del-icon {
          display: inline-block;
          width: 16px;
          height: 16px;
          background: url('../assets/delete-icon.svg') no-repeat;
          background-size: contain;
        }
      }
      .btn {
        height: 1em;
        width: 2em;
        font-weight: 700;
        border-radius: 3px;
        text-align: center;
        background-color: #f7f7f7;
        color: #5b6d8d;
        margin-right: 2px;
      }
    }
  }
}
</style>
